sub staff {
  my ($user, $rank) = @_;
  if (!$rank) {
    # Just return what they are
    # But hang on, this person called $user might not exist!
    if (exists $users->{$user}) {
      return $users->{$user}->{permissions};
    }
    else {
      return 0;
    }
  }
  # This is more complex. They want to know if a user has a certain power.
  else {
    # Another check, does the user exist?
    if (exists $users->{$user}) {
      if ($users->{$user}->{permissions} eq $rank) {
        return 1;
      }
      else {
        return 0;
      }
    }
    else {
      return 0;
    }
  }
}
1;